#!/bin/bash

# 构建Docker镜像
docker image build -t $HUB_USER/$REPOSITORY:$TAG .


# 运行所有单元测试
docker container run $HUB_USER/$REPOSITORY:$TAG ./mvnw test


# 登陆Docker HUb
docker login -u $HUB_USER -p $HUB_PWD

# 推送镜像到Hub
docker image push $HUB_USER/$REPOSITORY:$TAG